home *** CD-ROM | disk | FTP | other *** search
/ Ian & Stuart's Australian Mac 1993 September / clonecd / September 93.img / Archives / Decoration / Screensavers / Screen Savers / Darkness / Dark_docs < prev    next >
Text File  |  1990-05-08  |  4KB  |  61 lines

  1. DARK
  2. A "Blackout" Progrm for use with the
  3. Darkness screen saver
  4. written by Lunarmobiscuit
  5. Copyright ©1989 Lunarmobiscuit
  6.  
  7.  
  8. What is Dark?
  9.     Dark is a simple example of what I call a "Blackout" program.  It is a Multifinder "Aware" program which, for fairly obvious reasons, will only run as a foreground task.  Dark is usually launched by Darkness to darken the screen.  When it starts, Dark creates a window the size of the screen and paints it black.  The program runs until the user moves the mouse or does anything to cause an event, e.g. mouse click, key press, etc.
  10.  
  11. So why am I reading this?
  12.     The Darkness screen saver allows the user to create programs (I call them "Blackouts"), more interesting than Dark, which will be used to blacken the screen.  This is more fun than always watching Pyro™ fireworks or the Moire pattern.  This idea is also used by another screen saver, AfterDark™, but the "Blackouts" for Darkness are stand-alone program, so they are much easier to write than modules for AfterDark™.
  13.  
  14. What do I need?
  15.     Dark was written in THINK C 4.0, but it is fully compatible with 3.0.  The source code should compile in MPW C with only a few changes.  The actual Blackouts can be written in any language since they are stand-alone applications.  Some friends of mine at Apple have written Blackouts using MPW C and their source code can be found in another archive.
  16.     Even if you are not a Mac hacker, the information in Inside Macintosh volume 1 and some time is all you need to write a fun Blackout.
  17.  
  18. What are all these files?
  19.     Included in the archive are the following files:
  20.         Darkness: the screen saver application
  21.         Dark: the default Blackout
  22.         dark.c: the main segment of the source code (well documented)
  23.         darkInit.c: the initialization routines of the Dark Blackout
  24.         dark π.rsrc: the resources for Dark (actually just one menu)
  25.         Darkness_docs.mw: the documentation to Darkness
  26.         Dark_docs.mw: you are reading this file now
  27.  
  28.  
  29. Some advanced notes on Dark:
  30.  
  31. - Dark has its file type set to "Dark" instead of "APPL" so that it can't be launched.  Double clicking on Dark will launch Darkness if it is not running or put up an error message if Darkness is running.  Making your Blackout a "Dark" file will also give it the same icon as Dark.
  32.  
  33. - The main event loop of Dark is sent a null event at least twice a second, every 30 ticks.  If your Blackout needs to be called more often, change the second to last parameter to WaitNextEvent (default is 30L).
  34.  
  35. - The shell program for Dark should not be used as a basis for other Multifinder utilities.  Too much of the basic code is not included.  It can be used to learn how to handle the new osEvt events.
  36.  
  37.  
  38. About the Author:
  39.     Lunarmobiscuit, affectionately "Luni" for short, is currently a Junior Math/CS major at Carnegie Mellon University in Pittsburgh, Pennsylvania.  He is the author of _Launch, another Shareware Multifinder utility,  and a bunch of other programs which he keeps to himself.
  40.     The Lunarmobiscuit programming philosophy can be summed up in three ideas, "Make it small, fast, and stable."  Luni hates programs such as Word or the infamous FullWrite™ which contain every feature imaginable and which break all three of his programming rules.  This explains why Dark doesn't have any fancy graphics.
  41.  
  42.  
  43. About the Shareware System:
  44.     No one would seriously go to a computer store, pick up the latest copy of Darkness, look at the $39.99 price tag, and buy the program.  There is also no way that I would put up with a publisher, distributor, etc.  Therefore, to make promote the greatest happiness I am offering Darkness through the Shareware, a.k.a. Honor, system.  Make as many copies as you wish and distribute it to all your friends.  If you use the program, please write a check for $10 made out to Michael Libes and send it to:
  45.  
  46. Michael Libes
  47. 1071 Morewood Avenue
  48. Pittsburgh, PA  15213
  49.  
  50.     I also encourage everyone to write his own Blackouts and send them along with your contribution.
  51.  
  52.  
  53. Acknowledgments:
  54.     Many thanks to Tom Dowdy at Apple for his knowledge, ideas, and sample Blackouts.
  55.     I must also thank all those who subscribe to netnews.comp.sys.mac.programmers since their knowledge saved me many days of work.
  56.     
  57.  
  58. Parts of Dark Copyright © 1989 Symantec
  59. AfterDark is a trademark of Berkeley Systems
  60. Pyro is a trademark of Fifth Generation Systems
  61.